package com.xdtech.forum.service;

import java.util.List;
import java.util.Map;

import com.xdtech.common.service.IBaseService;
import com.xdtech.forum.model.CommentInfo;
import com.xdtech.forum.vo.CommentInfoItem;
import com.xdtech.web.model.Pagination;

/**
 * 
 * @author max.zheng
 * @create 2015-03-06 16:52:46
 * @since 1.0
 * @see
 */
public interface CommentInfoService extends IBaseService<CommentInfo>{

	/**
	 * 保存更新信息
	 * @author max.zheng
	 * @create 2015-03-06 16:52:46
	 * @modified by
	 * @param item
	 * @return
	 */
	boolean saveOrUpdateCommentInfo(CommentInfoItem item);

	/**
	 * 加载记录信息
	 * @author max.zheng
	 * @create 2015-03-06 16:52:46
	 * @modified by
	 * @param newId
	 * @return
	 */
	CommentInfoItem loadCommentInfoItem(Long commentInfoId);

	/**
	 * 根据id号删除记录信息
	 * @author max.zheng
	 * @create 2015-03-06 16:52:46
	 * @modified by
	 * @param id
	 * @return
	 */
	boolean deleteCommentInfoInfo(long id);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-03-06 16:52:46
	 * @modified by
	 * @param commentInfoIds
	 */
	boolean deleteCommentInfoInfo(List<Long> commentInfoIds);

	/**
	 * 加载最新5条评论
	 * @author max.zheng
	 * @create 2015-3-6下午10:21:27
	 * @modified by
	 * @return
	 */
	List<CommentInfoItem> loadTop5Items();

	/**
	 * 加载会员评论信息
	 * @author max.zheng
	 * @create 2015-3-7下午4:22:35
	 * @modified by
	 * @param id
	 * @return
	 */
	List<CommentInfoItem> loadCommentInfosByMemberId(Long id);

	/**
	 * 根据会员提交评论信息
	 * @author max.zheng
	 * @create 2015-3-8下午8:30:15
	 * @modified by
	 * @param articleId
	 * @param content
	 * @param memberId
	 */
	void saveMemberPostComment(Long articleId, String content, Long memberId);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-3-8下午9:05:31
	 * @modified by
	 * @param articleId
	 * @return
	 */
	Map<String, Object> loadArticleComments(Long articleId,Pagination pg);
}
